package org.example.factoryMethod.factoryMethodPl;

public class ConcreteCretor extends Creator{
    @Override
    public <T extends Product> T createproduct(Class<T> c) {
        Product product=null;
        try {
            product = (Product) Class.forName(c.getName()).newInstance();
        }catch (Exception e){
            e.printStackTrace();
        }
        return (T)product;
    }
}
